package com.piece.core.redis.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Configuration;
import java.util.List;

@Data
@RefreshScope
@Configuration
@ConfigurationProperties(prefix = "spring.data.cache")
public class CacheManagerProperties {

    private List<CacheConfig> configs;

    @Data
    public static class CacheConfig {

        /**
         * cache key
         */
        private String key;

        /**
         * 过期时间，sec
         */
        private long second = 60;
    }
}
